<template>
	<view class="uploadAvatar">
		<view class="top">
			<view class="left">
				<view class="title">添加头像</view>
				<view class="conText">据我们统计，<br>好的照片可以提升666%的匹配成功率。上传五官清晰的照片才可以让更多的人了解你</view>
			</view>
			<view class="right" @tap="upChooseImage">
				<image src="../../static/img/cancamer.png" ref="upImgTop"></image>	
			</view>
		</view>
		<!-- =====上传图片实例 -->
		<view class="upImg">
			<view class="imgList">
				<view class="one"><image src="../../static/img/img1.png"></image></view>
				<view class="two">
					<image src="../../static/img/success.png"></image>
					<text>清晰近照</text>
				</view>
			</view>
			<view class="imgList">
				<view class="one"><image src="../../static/img/img2.png"></image></view>
				<view class="two">
					<image src="../../static/img/close.png"></image>
					<text>非人物照</text>
				</view>
			</view>
			<view class="imgList">
				<view class="one"><image src="../../static/img/img3.png"></image></view>
				<view class="two">
					<image src="../../static/img/close.png"></image>
					<text>模糊照片</text>
				</view>
			</view>
			<view class="imgList">
				<view class="one"><image src="../../static/img/img4.png"></image></view>
				<view class="two">
					<image src="../../static/img/close.png"></image>
					<text>暴露照片</text>
				</view>
			</view>
			<view class="imgList">
				<view class="one"><image src="../../static/img/img5.png"></image></view>
				<view class="two">
					<image src="../../static/img/close.png"></image>
					<text>合拍照片</text>
				</view>
			</view>
		</view>
		<view class="upRealPic">上传真实头像，才能匹配成功哟~</view>
		<view class="next" @tap="goNextStep">下一步</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			upChooseImage(){
				var that=this;
				uni.chooseImage({
				    count: 1, //默认9
				    sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
				    sourceType: ['album','camera '], //从相册选择
				    success: function (res) {
				        console.log(JSON.stringify(res.tempFilePaths));
						that.$refs.upImgTop.src=JSON.stringify(res.tempFilePaths)
				    }
				});
			},
			goNextStep (){
				uni.navigateTo({
					url:'/pages/editInfor/editInfor'
				})

			}
		}
	}
</script>

<style lang="less" scoped>
	.uploadAvatar{
		width: 100%;
		background-color: #fff;
		padding: 0 60rpx;
		box-sizing: border-box;
		.top{
			display: flex;
			justify-content: space-between;
			margin-top: 100rpx;
			.title{
				font-size:38rpx;
				font-family:PingFang SC;
				font-weight:500;
				color:#333333;
			}
			.conText{
				font-size:24rpx;
				font-family:PingFang SC;
				font-weight:400;
				color:rgba(153,153,153,1);
				margin-top: 30rpx;
				line-height: 40rpx;
			}
			.left{
				width: 70%;
				flex-shrink: 0;
			}
			.right{
				width: 145rpx;
				height: 145rpx;
				border-radius: 50%;
				flex-shrink: 0;
				margin-top: 60rpx;
				image{
					width: 100%;
					height: 100%;
				}
			}
		}
		.upImg{
			display: flex;
			justify-content: space-between;
			margin-top: 400rpx;
			.imgList{
				.one{
					width: 113rpx;
					height: 115rpx;
					image{
						width: 100%;
						height: 100%;
					}
				}
				.two{
					image{
						width: 19rpx;
						height: 19rpx;
						margin-right: 10rpx;
					}
					text{
						font-size:16rpx;
						font-family:PingFang SC;
						font-weight:500;
						color:#666666;
						
					}
				}
			}
			
		}
		.upRealPic{
			width: 100%;
			text-align: center;
			font-size:26rpx;
			font-family:PingFang SC;
			font-weight:400;
			color:#999999;
			margin-top:70rpx;
		}
		.next{
			width:650rpx;
			height:88rpx;
			background:#ED2C61;
			color:#fff;
			text-align: center;
			line-height: 88rpx;
			margin-top:80rpx;
			font-size: 32rpx;
		}
	}
</style>
